package com.bjtu.boatmq.common;

import com.bjtu.boatmq.common.protocol.PacketSource;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

public class ServerHandler extends ChannelInboundHandlerAdapter {

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object ps)
            throws Exception {

        System.out.println("到handler了吗");
        System.out.println("server receive msg:"+ps);

        PacketSource pss = new PacketSource();


        System.out.println("server write msg:"+pss);
        ctx.writeAndFlush(pss);
    }
}
